//
// Created by User on 24-10-5.
//

#ifndef VIDEO_DECODER_H
#define VIDEO_DECODER_H

#include "general_decoder.h"
#include "frame_provider.hpp"

namespace decoder
{
    class video_decoder
        : public interfaces::video_frame_provider
    {
    public:
        explicit video_decoder(general_decoder& decoder);

        ~video_decoder() override = default;

        utils::media_frame get_frame() override;

        const AVCodecParameters* get_codec() const override;

        AVRational get_timebase() const override;

        int total_frames() const override;
    private:
        general_decoder& m_decoder;
    };
} // decoder

#endif //VIDEO_DECODER_H
